#ifndef KERNEL_H
#define KERNEL_H

// 内核相关的常量和宏定义
#define KERNEL_VERSION "1.0"
#define MAX_PROCESSES 256

// 进程状态
typedef enum {
    PROCESS_RUNNING,
    PROCESS_READY,
    PROCESS_BLOCKED,
    PROCESS_TERMINATED
} process_state_t;

// 进程控制块
typedef struct {
    int pid;                     // 进程ID
    process_state_t state;      // 进程状态
    void *stack_pointer;         // 栈指针
    // 其他进程相关信息
} process_control_block_t;

// 函数原型
void kernel_init();
void schedule();
void create_process(void (*process)());
void terminate_process(int pid);
void switch_context(process_control_block_t *current, process_control_block_t *next);

#endif // KERNEL_H